import demoEditComponent from "./index.vue";
import Vue from "vue";

const demoEditFrom = {};

demoEditFrom.install = function(Vue, options) {
  const ToastConstructor = Vue.extend(demoEditComponent);
  const instance = new ToastConstructor();

  instance.$mount(document.createElement("div"));

  document.body.appendChild(instance.$el);

  Vue.prototype.$modademoEdit = function(callback, num, type) {
    instance.visible = true;
    instance.callback = callback;
    instance.num = num;
    instance.type = type;
  };
};

export default demoEditFrom;
